package polygon.cli;

import org.apache.commons.cli.Options;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;

/**
 * @author MikeMirzayanov (mirzayanovmr@gmail.com)
 */
public class Cli {
    private Options options = new Options();

    private String login;
    private String password;

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Options getOptions() {
        return options;
    }

    /* init */ {
        Option login = OptionBuilder.withArgName("login")
                .hasArg()
                .withDescription("polygon user login (you may set PGN_LOGIN env. variable and do not use this option)")
                .create("login");
        Option password = OptionBuilder.withArgName("password")
                .hasArg()
                .withDescription("polygon user password (you may set PGN_PASSWORD env. variable and do not use this option)")
                .create("password");

        options.addOption(login);
        options.addOption(password);
    }
}
